package com.own.business.wechat.mobile.constant;

/**
 * ConstantWechatMobile
 *
 * @author chenxueli
 * @date 2021/3/3 15:24
 */
public final class ConstantWechatMobile {

    /**
     * 接口api
     */
    public interface Api {
        /**
         * 获取access_token的api
         */
        String GET_ACCESS_TOKEN_API = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + Field.APP_ID + "&secret=" + Field.APP_SECRET + "&code=" + Field.CODE + "&grant_type=authorization_code";
        /**
         * 获取用户个人信息（UnionID 机制）
         */
        String GET_USER_INFO_API = "https://api.weixin.qq.com/sns/userinfo?access_token=" + Field.TOKEN + "&openid=" + Field.OPEN_ID + "&lang=zh_CN";
    }

    /**
     * 字段信息
     */
    public interface Field {
        String APP_ID = "{app_id}";
        String APP_SECRET = "{app_secret}";
        String CODE = "{code}";
        String TOKEN = "{token}";
        String OPEN_ID = "{open_id}";
    }

}
